import {
    Http
} from "../utils/http.js"

class Like {
    // 是否喜欢
    static like(action, artID, category) {
        let url = action ? 'like' : "like/cancel"
        return Http.request({
            url: url,
            method: 'POST',
            data: {
                art_id: artID,
                type: category
            }
        })
    }

    // 获取喜欢状态
    static getLikeStatus(artID, category) {
        return Http.request({
            url: `classic/${category}/${artID}/favor`
        })
    }
}

export {
    Like

}